<?php

?>

<html>
<head>
<title>
 </title>
<link rel="shortcut icon" href='http://th3mma.com/imagez/syic.gif' />
<meta http-equiv=Content-Type content=text/html; charset=UTF-8>
<?php
$sh3llColor = "#990000";
echo CSS($sh3llColor)
?>
</head>
<!--TooL'Z Start INFO-->
<center>
<p><span lang="en-us"><font color="#FF0000">[ Scann3r Server ]</font>
</span></p>
<p>
<p>
<font size="4"><font color="#000000">Insert " <font color="#FF0000">IP</font> " Server , and Name oF " 
<font color="#FF0000">Script</font> "</font></font></p>
<form enctype="multipart/form-data" method="POST">
<p><span lang="en-us">&nbsp;</span></td></tr><tr><td height='45' colspan='2'><input type="text" name="dork" value="<?php if($_POST){echo filter($_POST['dork']);}else{echo "ip:127.0.0.1";} ?>" size="70" />
<input type='submit' value='g0t it !' name='Scan'>
</td></tr></table></p>
</form>
<!--TooL'Z End INFO-->
</center>
<?php

echo "
<center><table>";
if($_POST['Scan'])
{
    $array = array();
    $dork = filter(trim($_POST['dork']));
    echo "<sy> Dork: [".$dork."]<br>";
    $pageNum = 0;
    while(true || $pageNum <=5)
    {
        $bing = "http://www.bing.com/search?q=".str_replace(" ","+",$dork)."&go=&filt=all&first=".$pageNum."";
        if(!preg_match("/No results found for/",Connect_Host($bing)))
        {
            preg_match_all("/<h3><a href=\"(.*?)\">/",Connect_Host($bing),$sites);
            if(count($sites[1])==0)
            {return false;}
            for($i=0 ; $i < count($sites[1]);$i++)
            {
                $site = str_replace(array("http://","https://","www."),"",$sites[1][$i]);
                $site = substr($site,0,strpos($site,"/",0));;
                if(!in_array($site,$array))
                {
                    echo $site."<br />";
                    array_push($array,$site);    
                }
                flush();ob_flush();
            }
            $pageNum += 10;
        }
        else{echo "<sy>No Results !! .</sy>";ob_flush();flush();return false;}
    }
    //$array = array_unique($uSites);
    //for($i=0;$i<count($array);$i++){echo $array[$i]."<br />";}
}
echo "</table></center>";

function Connect_Host($url) 
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_FOLLOW, 0);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    $data = curl_exec($ch);
    if($data) {return $data;} 
    else {return 0;}
}
function CSS($sh3llColor)
{
    $css =  "
    <style>
    BODY
    {
        FONT-FAMILY: Verdana; 
        margin: 2;
        color: #cccccc;
        background-color: #FFF;
    }
    sy  
    {
        color:".$sh3llColor.";
        font-size:7pt;
        font-weight: bold;
    }
    #Box
    {
    color:".$sh3llColor.";
    font-size:14px;
    background-color:#000;
    font-weight:bold;
    width:500px;
    }
    tr 
    {
    BORDER-RIGHT:  #cccccc 1px solid;
    BORDER-TOP:    #cccccc 1px solid;
    BORDER-LEFT:   #cccccc 1px solid;
    BORDER-BOTTOM: #cccccc 1px solid;
    color: #ffffff;
    }
    td 
    {
    BORDER-RIGHT:  #cccccc 1px solid;
    BORDER-TOP:    #cccccc 1px solid;
    BORDER-LEFT:   #cccccc 1px solid;
    BORDER-BOTTOM: #cccccc 1px solid;
    color: #cccccc;
    }
    table 
    {
    BORDER:  #eeeeee  outset;
    BACKGROUND-COLOR: #000000;
    color: #cccccc;
    }
    input 
    {
    BORDER-RIGHT:  ".$sh3llColor." 1px solid;
    BORDER-TOP:    ".$sh3llColor." 1px solid;
    BORDER-LEFT:   ".$sh3llColor." 1px solid;
    BORDER-BOTTOM: ".$sh3llColor." 1px solid;
    BACKGROUND-COLOR: #333333;
    font: 9pt tahoma;
    color: #ffffff;
    }
    select 
    {
    BORDER-RIGHT:  #ffffff 1px solid;
    BORDER-TOP:    #999999 1px solid;
    BORDER-LEFT:   #999999 1px solid;
    BORDER-BOTTOM: #ffffff 1px solid;
    BACKGROUND-COLOR: #000000;
    font: 9pt tahoma;
    color: #CCCCCC;;
    }
    submit 
    {
    BORDER:  1px outset buttonhighlight;
    BACKGROUND-COLOR: #272727;
    width: 40%;
    color: #cccccc;
    }
    textarea 
    {
    BORDER-RIGHT:  #ffffff 1px solid;
    BORDER-TOP:    #999999 1px solid;
    BORDER-LEFT:   #999999 1px solid;
    BORDER-BOTTOM: #ffffff 1px solid;
    BACKGROUND-COLOR: #333333;
    color: #ffffff;
    }
    A:link {COLOR:".$sh3llColor."; TEXT-DECORATION: none}
    A:visited { COLOR:".$sh3llColor."; TEXT-DECORATION: none}
    A:active {COLOR:".$sh3llColor."; TEXT-DECORATION: none}
    A:hover {color:blue;TEXT-DECORATION: none}
    </style>";
    return $css;
}
function footer()
{
    echo '
<head>
<meta http-equiv="Content-Language" content="en-us">
</head>
<font color="#000000">

</html>
    ';
}
function filter($string)
{
    if(get_magic_quotes_gpc() != 0){return stripslashes($string);    }
    else{return $string;    }
}

footer();

?>